import { _decorator, Component, Node } from "cc";
import { getGlobal } from "../Global";
const { ccclass, property } = _decorator;

@ccclass("Hall")
export class Hall extends Component {
  @property(cc.Node)
  JoinGame: cc.Node;
  @property(cc.Node)
  createGame: cc.Node;

  start() { }
  onLoad() {
    let g = getGlobal();
    g.http.setURL("http://" + g.SI.hall);
    // this.JoinGame =
  }
  update(deltaTime: number) { }
  handleBtnClick(e, key) {
    console.log(arguments, "?args", this.JoinGame);
    if (key === "join") {
      this.JoinGame.active = true;
    }else if(key === "create"){
      this.createGame.active = true;
    }
  }
}
